<style lang="less" scoped>
</style>
<template>
    <Modal
        :value="value"
        @input="updateShow"
        :title="title"
        :loading="loading"
        @on-cancel="baseModelClose()"
        @on-ok="baseModelClick()">
        <slot></slot>
    </Modal>
</template>
<script>
    export default {
        name: 'basemodel',
        props: {
            value: {
                type: Boolean,
                default: false
            },
            title: {
                type: String,
                default: '基础模态框'
            },
            loading: {
                type: Boolean,
                default: true
            }
        },
        data () {
            return {
            };
        },
        computed: {

        },
        methods: {
            updateShow (show) {
                this.$emit('input', show)
            },
            baseModelClose () {
                this.$emit('model-close')
            },
            baseModelClick () {
                this.$emit('model-ok')
            }
        },
        components: {
        },
        activated: function () {   //  组件激活时调用
        },
        mounted: function () {
            this.$emit('update:foo', this.showmodel)
        }
    };
</script>
